var express = require('express');
var router = express.Router();
const {userModel,people,cate} = require("../model/model")

//用户渲染数据
router.get('/people',async(req,res)=>{
  const data = await people.find()
  res.send({
    code:200,
    data:data
  })
})

//分类数据渲染
router.get('/cate',async(req,res)=>{
  const data = await cate.find()
  res.send({
    code:200,
    data:data
  })
})

module.exports = router;
